package com.ruoyi.crm.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseFlowEntity;
import com.ruoyi.crm.domain.dto.FlowHisTaskDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 项目结算表对象 crm_clear_account
 *
 * @author ruoyi
 * @date 2024-12-13
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class CrmClearAccount extends BaseFlowEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 结算表id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /** 商机id */
    @Excel(name = "商机id")
    private String orderId;

    /** 部门id */
    @Excel(name = "部门id")
    private Long deptId;

    /** 项目编号 */
    @Excel(name = "项目编号")
    private String projectOn;

    /** 项目名称 */
    @Excel(name = "项目名称")
    private String projectName;

    /** 客户名称 */
    @Excel(name = "客户名称")
    private String customerId;

    /** 项目申请人id */
    @Excel(name = "项目申请人id")
    private String applyUser;

    /** 项目负责人id */
    @Excel(name = "项目负责人id")
    private String principalId;

    /** 项目汇款情况说明 */
    @Excel(name = "项目汇款情况说明")
    private String payment;

    /** 开始日期 */
    @Excel(name = "开始日期", readConverterExp = "开=始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    /** 结束日期 */
    @Excel(name = "结束日期", readConverterExp = "结=束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    /** 项目金额 */
    @Excel(name = "项目金额")
    private BigDecimal projectSum;

    /** 最终利率 */
    @Excel(name = "最终利率")
    private BigDecimal profit;

    /** 利润率 */
    @Excel(name = "利润率")
    private BigDecimal profitMargin;

    /** 费用总计 */
    @Excel(name = "费用总计")
    private BigDecimal aggregationCharge;

    /** 管理层意见 */
    @Excel(name = "管理层意见")
    private String opinion;

    /** 附件 */
    @Excel(name = "附件")
    private String url;

    /** 其他 */
    @Excel(name = "其他")
    private String other;

    /** 审核状态 */
    @Excel(name = "审核状态")
    private String auditStatus;

    @TableField(exist = false)
    private String customerName;

    /** 删除标记（0 未删除 1 删除） */
    private String delFlag;

    /**
     * 费用明细
     */
    @TableField(exist = false)
    private List<CrmOrderClearDetails> detailsList;


    /**
     * 审批记录
     */
    @TableField(exist = false)
    private List<FlowHisTaskDTO> hisTaskList;


}
